package com.zufe.springdemo.service;

import com.zufe.springdemo.mapper.UserMapper;
import com.zufe.springdemo.model.Information;
import com.zufe.springdemo.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired
    UserMapper userMapper;
    public User selectUser(int userId){
        User user = userMapper.selectUser(userId);
        return user;
    }

    public List<User> selectAllUser(){
        List<User> list = userMapper.selectAllUser();
        return list;
    }

    public List<Information> selectLeftOnUser(){
        List<Information> list = userMapper.selectLeftOnUser();
        return list;
    }
}
